#ifndef MENSEIMAINWINDOW_H
#define MENSEIMAINWINDOW_H

#include <QtGui>

#include "gui/homescreen.h"

#include "core/basecontroller.h"

#include "core/customercontroller.h"
#include "gui/customerview.h"

#include "core/itemcontroller.h"
#include "gui/itemview.h"

#include "core/transactioncontroller.h"
#include "gui/transactionview.h"

#include "core/suppliercontroller.h"
#include "gui/supplierview.h"

/*
  The application's main window. This is the only widget that
  main() creates and shows, and as such, the application will
  typically terminate when main()'s instance of MenseiMainWindow
  is closed.

  The main window contains a tab widget, which the application's
  screens/views attach to.
 */
class MenseiMainWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit MenseiMainWindow(QWidget *parent = 0);

signals:

public slots:
    void onFileOpened(QString filePath);

private:
    void createControllersAndViews();
    void disableTabs();
    void enableTabs();
    void initWndComponents();
    void initWndSignalsAndSlots();
    void createMenuBar();

    int tabCount;

    QMenu *fileMenu;
    QMenu *helpMenu;

    QTabWidget *tabWidget;
    HomeScreen *homeScreen;

    CustomerController *custCtrl;
    CustomerView *custView;

    ItemController *itemCtrl;
    ItemView *itemView;

    TransactionController *transCtrl;
    TransactionView *transView;

    SupplierController *supplierCtrl;
    SupplierView *supplierView;
};

#endif // MENSEIMAINWINDOW_H
